<?php

namespace api\controller;

// +----------------------------------------------------------------------
// | 个人认证数据控制层
// +----------------------------------------------------------------------

use common\controller\VerifyController;
use common\service\UserAuthenticationService;
use think\Request;

class UserAuthenticationController extends VerifyController
{
    /**
     * @var UserAuthenticationService
     */
    private $userAuthenticationService;

    public function __construct()
    {
        parent::__construct();
        $this->userAuthenticationService = new UserAuthenticationService();
    }


    /**
     * 提交认证信息
     * @param Request $request
     * @return \think\Response
     * @throws \Throwable
     */
    public function submit(Request $request)
    {
        $param = $request->param();
        $res = $this->userAuthenticationService->submit($param['data']);
        return json(success_response("", $res));
    }

    /**
     * 查询
     * @param Request $request
     * @return \think\Response
     */
    public function find(Request $request)
    {
        $res = $this->userAuthenticationService->find($request->param());
        return json(success_response("", $res));
    }


}
